import requests

url1 = "http://fanyi.youdao.com/"
headers = {
    "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.102 Safari/537.36"
}
data1 = {
    "i": "floct",
    "from": "AUTO",
    "to": "AUTO",
    "smartresult": "dict",
    "client": "fanyideskweb",
    "salt": "16062731377594",
    "sign": "aec7e796b5a0870d6bd0d91718f838ef",
    "lts": "1606273137759",
    "bv": "02edb5d6c6ac4286cd4393133e5aab14",
    "doctype": "json",
    "version": "2.1",
    "keyfrom": "fanyi.web",
    "action": "FY_BY_REALTlME"
}

response1 = requests.post(url1, headers=hasattr, data=data1)
print(response1.content.decode())

url2 = 'http://fy.iciba.com/ajax.php?a=fy'
headers2 = {
    "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.102 Safari/537.36"
}
data2 = {
    'f': 'auto',
    't': 'auto',
    'w': '好好学习'
}
r = requests.post(url2, headers=headers2, data=data2)
print(r.content)
